package org.jetlinks.pro.koudai.tenant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.jetlinks.pro.tenant.AssetPermission;
import org.jetlinks.pro.tenant.EnumAssetType;
import org.jetlinks.pro.tenant.supports.CrudAssetPermission;

import java.util.Arrays;
import java.util.List;

@AllArgsConstructor
@Getter
public enum KoudaiAssetType implements EnumAssetType {
    termsCourse("学期课程", Arrays.asList(CrudAssetPermission.values())),

    course("课程", Arrays.asList(CrudAssetPermission.values())),
    course_type("课程类型", Arrays.asList(CrudAssetPermission.values())),
    experiment("实验", Arrays.asList(CrudAssetPermission.values())),
    experimentScore("实验成绩", Arrays.asList(CrudAssetPermission.values())),
    question("试题", Arrays.asList(CrudAssetPermission.values())),
    studentClass("班级", Arrays.asList(CrudAssetPermission.values())),
    takedExperiment("在进行的实验", Arrays.asList(CrudAssetPermission.values())),
    test("测验", Arrays.asList(CrudAssetPermission.values())),
    resource("资源", Arrays.asList(CrudAssetPermission.values()))
    ;

    public static final String type_product = "koudai";

    private final String name;

    private final List<AssetPermission> permissions;

    @Override
    public String getId() {
        return name();
    }

}
